import React from 'react';
import { Button } from 'antd';

export default function Counter() {
  debugger;
  const [number, setNumber] = React.useState(0);
  const handleClick = () => {
    debugger;
    setNumber(number + 10);
    setNumber(number + 10);
  };
  return (
    <div className="counter">
      <p>函数组件: {number}</p>
      <Button type="primary" onClick={handleClick}>
        +
      </Button>
    </div>
  );
}
